<?php

require_once '../mysqlConnect.php';

function retrieveAllICDCodes() {
		
		$DBH = GetPDOConnection();
		$sql = "SELECT * FROM icd_codes ORDER BY code";
		
		try {
			$STH = $DBH->prepare($sql);
			$STH->setFetchMode(PDO::FETCH_ASSOC);
			$STH->execute();
			$result = $STH->fetchAll();
			return $result;
		} catch (PDOException $e) {
			$ValidationErrors = "Can't query database for ICD9 Codes: " . $e->getMessage();
		}
}